package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/10/20 11:32
 **/
public class Day48_3_Num278_FirstBadVersion {
    public class Solution{
        boolean isBadVersion(int version){return true;};
        public int firstBadVersion(int n) {
            int l = 1, r = n, mid = 0;
            while(l < r){
                mid = l + ((r-l)>>1);
                if(isBadVersion(mid)){
                    r = mid;
                }else l = mid + 1;
            }
            return l;
        }
    }
}